#pragma once
#include "cdicamera.h"
#include <d3dx9.h>

class CdiMovementCamera :
  public CdiCamera
{
  int               m_centerX;
  int               m_centerY;
  LPDIRECT3DDEVICE9 m_pDevice;

protected:
  bool  m_ready;
  
public:
  CdiMovementCamera( LPDIRECT3DDEVICE9 pDevice );

  CdiMovementCamera(LPDIRECT3DDEVICE9 pDevice, D3DXVECTOR3& position, D3DXVECTOR3& lookAt, D3DXVECTOR3& up );

  ~CdiMovementCamera();

  // Handle the input
  virtual void HandleInput(UINT Msg, WPARAM wParam, LPARAM lParam);

public:
  // Properties

  // Is the camera ready
  inline bool IsReady() const { return m_ready; }

  // Sets the camera to start handling the input
  void SetCameraReady(bool CameraReady);
  
  // Set's the mouses current middle position
  void SetWindowMiddle(int x, int y);

  // Move the Camera and the viewing
  virtual void MoveCameraAndView(float x, float y, float z);
  
  // Moves the camera Angle
  virtual void MoveCameraAngle(float x, float y, float z);

};
